﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UnDbxNET.Files
{
    class dbxInfo
    {
        public int index;
        public string filename;
        public dbxEnums.dbx_mask_t valid;
        public uint message_index;
        public uint flags;
        public DateTime send_create_time;
        public uint body_lines;
        public uint message_address;
        public string original_subject;
        public DateTime save_time;
        public string message_id;
        public string subject;
        public string sender_address_and_name;
        public string message_id_replied_to;
        public string server_newsgroup_message_number;
        public string server;
        public string sender_name;
        public string sender_address;
        public uint message_priority;
        public uint message_size;
        public DateTime receive_create_time;
        public string receiver_name;
        public string receiver_address;
        public string account_name;
        public string account_registry_key;
    }

    class dbxInfoComparer : IComparer<dbxInfo>
    {
        public int Compare(dbxInfo pInfoA, dbxInfo pInfoB)
        {
            int res = string.Compare(pInfoA.filename, pInfoB.filename);
            if (res == 0) res = pInfoA.index - pInfoB.index;
            return res;
        }
    }
}

